﻿namespace EyeOpen.CsvParser.Windows
{
	using System;
	using System.Windows.Forms;

	public partial class MainForm : Form
	{
		private readonly string csv =
			"Steve,32" + Environment.NewLine +
			"Bill,50" + Environment.NewLine +
			"Martin,60";

		public MainForm()
		{
			InitializeComponent();

			object customerList =
				new CustomerParser()
					.Parse(csv);

			object table = 
				new DataTableParser()
					.GetTable(csv, "Name", "Age");

			dataGridView1.DataSource = table;
			////dataGridView1.DataSource = customerList;
		}
	}
}